<script>
$(function(){
    $('#form').submit(function(){
        $.post(location.href,$(this).serialize()+'&type=modi',function(data){
            if (data.state <= 0)
            {
                alert(data.message);
                $('#'+data.extra).focus();
                return false;
            }
            //dialogMessage(data.message,'green');
			alert(data.message);
        },'json');
        return false;
    });
	$('#group_id').val(<?=$this->member['group_id']?>);
});
</script>
<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span class="span_now">添加管理员</span>
</div>
</div>
</div>
<div class="edit_div">
<div class="line_1"></div>
<form id="form">
    <div class="form_div1">
        <span class="span1">必填信息：</span>
    </div>
    <div class="form_div1">
        <span class="span1">用户名</span>
        <span><input name="username" id="username" value="<?php echo $this->member['username']; ?>" /><font color="#848484">15个字符以内</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">姓名</span>
        <span><input name="nickname" id="nickname" value="<?php echo $this->member['nickname']; ?>" /><font color="#848484">5个字符以内</font></span>    
    </div>
    <div class="form_div1">
        <span class="span1">密码</span>
        <span><input name="password" type="password" id="password" value="" /><?php if('modi'==MOD):?><b style="color:#9d9d9d">不更改请留空</b><?php endif; ?></span>
    </div>
    <div class="form_div1">
        <span class="span1">确认密码</span>
        <span><input name="password_confirm" type="password" id="password_confirm" value="" /></span>
    </div>
    <div class="form_div1">
        <span class="span1">所属用户组</span>
        <span>
			<select id="group_id" name="group_id" style="width:auto">
				<option>请选择用户组</option>
				<?php foreach ((array)$this->groups as $group): ?>
				<option value="<?=$group['gid']?>"><?=$group['name']?></option>
				<?php endforeach; ?>
			</select><?php if('modi'==MOD):?><b style="color:#9d9d9d">修改用户组会替换现有用户组设置</b><?php endif; ?>
		</span>
    </div>
    <div class="form_div1">
        <span class="span1">选填信息：</span>
    </div>
    <div class="form_div1">
        <span class="span1">职务</span>
        <span><input name="job" id="job" value="<?php echo $this->memberd['job']; ?>" /><font color="#848484">20个字符以内</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">法定假期</span>
        <span><input name="statutory_holiday" id="statutory_holiday" value="<?php echo $this->memberd['statutory_holiday']; ?>" /><font color="#848484">0~365天以内</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">手机</span>
        <span><input name="mobile" id="mobile" value="<?php echo $this->memberd['mobile']?$this->memberd['mobile']:''; ?>" /><font color="#848484">11位数字</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">座机</span>
        <span><input name="tel" id="tel" value="<?php echo $this->memberd['tel']?$this->memberd['tel']:''; ?>" /><font color="#848484">7或11位数字，区号与号码中间无需符号</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">住址</span>
        <span><input name="address" id="address" value="<?php echo $this->memberd['address']; ?>" /><font color="#848484">100个字符以内</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">籍贯</span>
        <span><input name="nplace" id="nplace" value="<?php echo $this->memberd['nplace']; ?>" /><font color="#848484">10个字符以内</font></span>
    </div>
    <div class="form_div1">
        <span class="span1">学历</span>
        <span>
            <select name="education" style="width:155px">
                <option value="1">小学</option>
                <option value="2">中学</option>
                <option value="3">高中</option>
                <option value="4">大学</option>
                <option value="5">研究生</option>
                <option value="6">硕士</option>
                <option value="7">博士</option>
            </select>
        </span>
    </div>
    <div class="form_div1">
        <span class="span1">生日</span>
        <span><input name="birthday" id="birthday" value="<?php echo $this->memberd['birthday']?date('Y-m-d',$this->memberd['birthday']):''; ?>" onclick="new Calendar(1981,2011).show(this)" readonly="readonly" /></span>
    </div>
    <div class="form_div1">
        <span class="span1">毕业院校</span>
        <span><input name="school" id="school" value="<?php echo $this->memberd['school']; ?>" /><font color="#848484">25个字符以内</font></span>
    </div>
<div class="form_div1">
       <span class="span1"></span>
       <span><input type="submit" class="btn1" value="确定" /><input name="" type="reset" class="btn1" value="重置" /><input type="hidden" name="type" value="<?php echo $_GET['uid']?'modi':''; ?>" /></span>
</div>
</form>
</div>